Optimal. Leaf size=56 \[ \frac {B x}{2}+\frac {(A+C) \sin (c+d x)}{d}+\frac {B \cos (c+d x) \sin (c+d x)}{2 d}-\frac {A \sin ^3(c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {4132, 2715, 8,
4129, 3092} \begin {gather*} \frac {(A+C) \sin (c+d x)}{d}-\frac {A \sin ^3(c+d x)}{3 d}+\frac {B \sin (c+d x) \cos (c+d x)}{2 d}+\frac {B x}{2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2715
Rule 3092
Rule 4129
Rule 4132
Rubi steps
\begin {align*} \int \cos ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=B \int \cos ^2(c+d x) \, dx+\int \cos ^3(c+d x) \left (A+C \sec ^2(c+d x)\right ) \, dx\\ &=\frac {B \cos (c+d x) \sin (c+d x)}{2 d}+\frac {1}{2} B \int 1 \, dx+\int \cos (c+d x) \left (C+A \cos ^2(c+d x)\right ) \, dx\\ &=\frac {B x}{2}+\frac {B \cos (c+d x) \sin (c+d x)}{2 d}-\frac {\text {Subst}\left (\int \left (A+C-A x^2\right ) \, dx,x,-\sin (c+d x)\right )}{d}\\ &=\frac {B x}{2}+\frac {(A+C) \sin (c+d x)}{d}+\frac {B \cos (c+d x) \sin (c+d x)}{2 d}-\frac {A \sin ^3(c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 53, normalized size = 0.95 \begin {gather*} \frac {6 B c+6 B d x+3 (3 A+4 C) \sin (c+d x)+3 B \sin (2 (c+d x))+A \sin (3 (c+d x))}{12 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.47, size = 57, normalized size = 1.02
method | result | size |
derivativedivides | \(\frac {\frac {A \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+B \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+C \sin \left (d x +c \right )}{d}\) | \(57\) |
default | \(\frac {\frac {A \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+B \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+C \sin \left (d x +c \right )}{d}\) | \(57\) |
risch | \(\frac {B x}{2}+\frac {3 A \sin \left (d x +c \right )}{4 d}+\frac {C \sin \left (d x +c \right )}{d}+\frac {A \sin \left (3 d x +3 c \right )}{12 d}+\frac {B \sin \left (2 d x +2 c \right )}{4 d}\) | \(59\) |
norman | \(\frac {B x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {\left (2 A -B +2 C \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {B x}{2}-B x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {B x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {\left (2 A -3 B -6 C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}-\frac {\left (2 A +B +2 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {\left (2 A +3 B -6 C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}\) | \(180\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 55, normalized size = 0.98 \begin {gather*} -\frac {4 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B - 12 \, C \sin \left (d x + c\right )}{12 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.51, size = 45, normalized size = 0.80 \begin {gather*} \frac {3 \, B d x + {\left (2 \, A \cos \left (d x + c\right )^{2} + 3 \, B \cos \left (d x + c\right ) + 4 \, A + 6 \, C\right )} \sin \left (d x + c\right )}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right ) \cos ^{3}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 138 vs.
\(2 (50) = 100\).
time = 0.45, size = 138, normalized size = 2.46 \begin {gather*} \frac {3 \, {\left (d x + c\right )} B + \frac {2 \, {\left (6 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 4 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 12 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.53, size = 66, normalized size = 1.18 \begin {gather*} \frac {B\,x}{2}+\frac {2\,A\,\sin \left (c+d\,x\right )}{3\,d}+\frac {C\,\sin \left (c+d\,x\right )}{d}+\frac {B\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )}{2\,d}+\frac {A\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )}{3\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________